let arr = []
const demoContext = require.context('@/views', true, /index.vue$/)
demoContext.keys().forEach((item, i) => {
  if (/.vue$/.test(item)) {
    const componentConfig = demoContext(item).default
    let str = item.match(/.\/(\S*).vue/)[1]
    let path = str.substring(0, str.lastIndexOf('/'))
    let test_route = {
      path: '/' + path,
      name: path,
      meta: {
        // title: componentConfig.title,
        component: path,
      },
    }
    arr.push(test_route)
  }
})

export const testRoutes = arr
